﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using r2mp_DataStructures;

namespace r2mp_GUI
{
    public partial class DiagramDialog : Form
    {
        private int period = r2mp_DataStructures.MTA.Month;

        public int Period
        {
            get { return period; }
        }

        private int selectedDiagram = MTA;

        public int SelectedDiagram
        {
            get { return selectedDiagram; }
        }

        public const int MTA = 0;
        public const int PSP = 1;

        public DiagramDialog()
        {
            InitializeComponent();
            periodBox.SelectedIndex = 0;
        }

        private void periodBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (periodBox.SelectedIndex)
            {
                case 0:
                    period = r2mp_DataStructures.MTA.Month;
                    break;
                case 1:
                    period = r2mp_DataStructures.MTA.Week;
                    break;
            }
        }

        private void mtaButton_CheckedChanged(object sender, EventArgs e)
        {
            selectedDiagram = MTA;
            periodBox.Enabled = true;
        }

        private void pspButton_CheckedChanged(object sender, EventArgs e)
        {
            selectedDiagram = PSP;
            periodBox.Enabled = false;
        }
    }
}
